# -*- coding: utf-8 -*-
# created by Src - 一路好时光

d={"name":"Alex","age":26,"hobbie":"游泳"}
list=["src1","src2","src3"]
def change_data(info,girls):
    info["hobbie"] = "学习"
    girls.append("XiaoYun")
    d={}


change_data(d,list)#传的引用地址
print(d,list)

#打印结果
#{'name': 'Alex', 'age': 26, 'hobbie': '学习'} ['src1', 'src2', 'src3', 'XiaoYun']

# >>> d={"name":"Alex","age":26,"hobbie":"游泳"}
# >>> list=["src1","src2","src3"]
# >>> id(d)
# 1840763913536
# >>> id(d["name"])
# 1840764446032
# >>> id(d["age"])
# 140717658676440
# >>> id(list)
# 1840762507840
# >>> id(list[1])
# 1840764447376
